- Author:
- Weiwei Ai <wai484@aucklanduni.ac.nz>
- Date:
- 2024-03-27 12:28:20+13:00
- Desc:
- Add CellMLV2 including models and data
- Permanent Source URI:
- http://models.cellml.org/workspace/b65/rawfile/003591ae9e4dd30288d02edc64c841fc5ff71e24/Facilitated transporter/CellMLV2/GLUT1_ss_oi.py
# The content of this file was generated using the Python profile of libCellML 0.5.0.
from enum import Enum
from math import *
__version__ = "0.4.0"
LIBCELLML_VERSION = "0.5.0"
STATE_COUNT = 1
VARIABLE_COUNT = 35
class VariableType(Enum):
VARIABLE_OF_INTEGRATION = 0
STATE = 1
CONSTANT = 2
COMPUTED_CONSTANT = 3
ALGEBRAIC = 4
VOI_INFO = {"name": "t", "units": "second", "component": "params_BG", "type": VariableType.VARIABLE_OF_INTEGRATION}
STATE_INFO = [
{"name": "g_o", "units": "mM", "component": "params_BG", "type": VariableType.STATE}
]
VARIABLE_INFO = [
{"name": "K_2", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "K_3", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "c", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "d", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_4", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "K_1", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "h", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "g", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Ao", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "a", "units": "per_fmol_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "b", "units": "per_s", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "K_Ai", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r1", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r2", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r3", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r4", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "E", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "GC", "units": "uM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_i", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_Ao", "units": "fmol", "component": "params_BG", "type": VariableType.ALGEBRAIC},
{"name": "V_o", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_Ai", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "g_i", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "R", "units": "J_per_K_mol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "T", "units": "kelvin", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_1", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_2", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_3", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_4", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "lambda", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "v_max", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "k_m_1", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "k_m_2", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "k_m_3", "units": "dimensionless", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "v", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC}
]
def create_states_array():
return [nan]*STATE_COUNT
def create_variables_array():
return [nan]*VARIABLE_COUNT
def initialise_variables(states, rates, variables):
variables[1] = 1.0e-5
variables[2] = 1113.0
variables[3] = 90.3
variables[5] = 1.0e-6
variables[6] = 0.726
variables[7] = 12.1
variables[9] = 1000.0
variables[17] = 6.67
variables[18] = 90.0
variables[20] = 90.0
variables[22] = 0.0
variables[23] = 8.31
variables[24] = 273.15
variables[25] = 0.1501
variables[26] = 0.1501
variables[27] = 0.1501
variables[28] = 0.1501
states[0] = 0.0
def compute_computed_constants(variables):
variables[0] = variables[1]*variables[2]/variables[3]
variables[4] = variables[5]*variables[6]/variables[7]
variables[8] = variables[0]/variables[5]*variables[9]/variables[10]
variables[10] = 9.5*variables[9]
variables[11] = variables[8]
variables[12] = variables[6]/variables[4]
variables[13] = variables[2]/variables[0]
variables[14] = variables[10]/variables[0]
variables[15] = 1.0*variables[14]
variables[16] = variables[17]*variables[18]*1.0/1000.0
variables[21] = variables[22]*variables[18]
variables[29] = variables[13]/variables[12]
variables[30] = variables[16]*variables[13]*variables[1]/(variables[1]/variables[5]+variables[1]/variables[4])
variables[31] = (variables[1]/variables[5]+variables[1]/variables[4])/(variables[1]/variables[0]+variables[29]*variables[1]/variables[4])
variables[32] = (variables[1]/variables[5]+variables[1]/variables[4])/(1.0+variables[29]*variables[1]/variables[5])
variables[33] = (variables[1]/variables[5]+variables[1]/variables[4])/(variables[29]*(1.0+variables[1]/variables[0]))
def compute_rates(voi, states, rates, variables):
rates[0] = 1.0
def compute_variables(voi, states, rates, variables):
variables[19] = states[0]*variables[20]
variables[34] = variables[30]/variables[31]*(variables[8]*variables[19]-variables[11]*variables[21])/(1.0+variables[8]*variables[19]/variables[31]+variables[11]*variables[21]/variables[32]+variables[8]*variables[19]*variables[11]*variables[21]/variables[33])